const Parame = require('./constants');
module.exports = [
  {
    test: /\.(js|jsx)$/,
    include: Parame.srcPath,
    enforce: 'pre',
    use:[{loader: 'eslint-loader'}]
  }, {
    test: /\.(c|le|sa|sc)ss$/,
    include: Parame.srcPath,
    enforce: 'pre',
    use:[{loader: 'stylelint-loader'}]
  }, {
    test: /\.(png|jpe?g|gif|ico)(\?.*)?$/,
    use: [
      {
        loader: 'url-loader',
        options: {
          name: 'images/[name].[ext]?[md5:hash:4]',
          limit: 1024 * 10
        }
      }
    ]
  }, {
    test: /\.(svg|eot|woff\d?|ttf)(\?.*)?$/,
    use: [
      {
        loader: 'url-loader',
        options: {
          name: 'fonts/[name].[ext]?[md5:hash:4]',
          limit: 1024 * 15
        }
      }
    ]
  }, {
    test: /\.(mp4|ogg|)(\?.*)?$/,
    use: [
      {
        loader: 'file-loader',
        options: {
          name: 'videos/[name].[ext]?[md5:hash:4]'
        }
      }
    ]
  }
];
